package com.chainyoung.common.event;

public class BaseEvent<T> {

    public enum EventCode {
        LOGIN_IN,
        LOGIN_OUT,
        OTHER_DEVICE_LOGIN,
        REFRESH_MARKET_COUPLE_NAME,//选择交易对
        WS_OPEN,//行情
        WS_TRADE_OPEN,//币币交易
        WS_INDEX_OPEN,//首页行情
        MSG_NUM,//未读消息数
        CLEAR_MSG,// 清除消息数量
        WS_KLINE_OPEN,// 币币交易K线图
        WS_UPDATE_TOP_DATA,//币币交易头部数据
        TRADE_TYPE,//
        IS_ASSET_VISIBLE,//资产是否可见
        IS_GET_NEW_WALLET,//是否新建或者导入HD钱包
        REFRESH_TOTAL_ASSET,//刷新总资产
        REFRESH_WALLET_NAME,//刷新钱包名称
        REFRESH_FINANCING_TRADE,//刷新资产
        REFRESH_FIAT_COIN_NAME,//刷新法币交易币种
        REFRESH_WALLET_BG,//刷新钱包页面背景
    }

    private EventCode code;
    private T data;

    public BaseEvent(EventCode code) {
        this.code = code;
    }

    public BaseEvent(EventCode code, T data) {
        this.code = code;
        this.data = data;
    }

    public EventCode getCode() {
        return code;
    }

    public void setCode(EventCode code) {
        this.code = code;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }
}
